function adjustHeight() {
	var txt = "";
	var w = $(window).height();
	var ww = $(window).width();
	var h = $("#header").height();
	var s = $("#sidebar").height();
	var r = $("#wrapper").height();
	var i = $(".in").height();
	var m = $("#main").height();
	var f = $(".fixed").height();
	// $("#leftmenu").height(w-h-29);
	$("#framecenter").ligerTab({
				height : w - h
			});
	var tab = $("#framecenter").ligerGetTabManager();
	tab.setHeight(w - h);
	$("#leftmenu").css({
				height : w - h - 29
			});
	$("#main").height(w - h - 80);
}

$(window).resize(function() {
	adjustHeight();
});
$(window).load(function() {
	adjustHeight();
});

$("#topMenu li").live('click', function() {
    var tab = $("#framecenter").ligerGetTabManager();
    var url=$(this).find("a").attr("href");
    if(url!=undefined){
        url=url.replace("#","");
        var fn=$(this).find("a").attr("fn");
        if(fn!=undefined){
            eval(fn+"()");
        }else{
            var tabId=$(this).find("a").attr("tab_id");
            if(tabId==undefined){
                tabid = new Date().getTime();
            }
            $("#loading").show();
            var text = $(this).find("a").text();
            tab.removeTabItem(tabId);
            tab.addTabItem({ tabid :tabId,text: text, url: url });
        }
    }
    return false;
});

